package com.elbis.access.wg.api.request.account;

import com.elbis.access.Constants;
import com.elbis.access.response.ResponseEntity;
import com.elbis.access.wg.api.request.AbstractWargamingRequestImpl;
import com.elbis.access.wg.api.request.WOTRequestEntity;
import com.elbis.access.wg.api.response.account.PersonalDataResponse;
import com.elbis.access.wg.api.util.JSONUtil;

public class PersonalDataRequestImpl extends AbstractWargamingRequestImpl {

	public PersonalDataRequestImpl(WOTRequestEntity requestEntity) {
		protocol = Constants.DEFAULT_PROTOCOL;
		method = Constants.DEFAULT_METHOD;
		uri = com.elbis.access.wg.api.Constants.WOT_ACCOUNT_INFO;
		entity = requestEntity;
	}

	@Override
	public ResponseEntity updateFromResponse() {
		PersonalDataResponse responseImpl = JSONUtil.fromJson(
				response.getResponseData(), PersonalDataResponse.class);
		return responseImpl;
	}

}
